#BHS.py
#   This is basically a giant string table used to keep these strings from messing up files containing source code.
#Copyright 2006 Jacques Richer
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

edit_head = """<html>
<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>
<script type="text/javascript">
	window.onload = function()
	{
		var oFCKeditor = new FCKeditor( 'pagetext' ) ;
		oFCKeditor.BasePath = "/FCKeditor/" ;
		oFCKeditor.ToolbarSet = 'Wiki' ;
		oFCKeditor.ReplaceTextarea() ;
	}
</script>
<head>
<title><<TITLE>></title>
</head>"""

display_head = """<html>
<head>
<title><<TITLE>></title>
</head>"""

body_prefix = """<body>
<h1>Page: <<TITLE>></h1>
<table width="100%" border="0">
<tr><form action="/formshow" method="post"><input name="pagename" type="text" size=30 maxlength=30 />
<input type="submit" value="Goto Page" /></form></tr><tr>
<form action="/editpage/<<QTITLE>>" method="post"><input type="submit" value="Edit This Page" /></form></tr>
<tr>&nbsp;&nbsp;<a href="/previous/<<QTITLE>>/<<ID>>">Older Version</a> <a href="/next/<<QTITLE>>/<<ID>>">Newer Version</a> </tr>
<tr><a href="/showrevs/<<QTITLE>>">Show Revisions</a></tr>
</table>
"""

edit_body_prefix = """<body>
<h1>Page: <<TITLE>></h1>
<table width="100%" border="0">
<tr><form action="/formshow" method="post"><input name="pagename" type="text" size=30 maxlength=30 />
<input type="submit" value="Goto Page" /></form></tr><tr>
<form action="/showpage/<<QTITLE>>" method="post"><input type="submit" value="Abort Edit" /></form></tr>
</table>
"""

edit_body = """<form action="/postpage" method="post">
<p><label>Page Name: <input name="pagename" type="text" size="30" maxlength="30" value="<<TITLE>>" /></label> 
<textarea id="pagetext" name="pagetext"><<PAGETEXT>></textarea></p><br />
<p><label>Revision Notes: <input name="revnote" type="text" size=60 maxlength=60 /></p>
<p><input type="submit" value="Publish Page" />
</form>"""

display_body = """<hr /><<PAGETEXT>>"""

body_postfix = """<br /><hr />
Built with uPWiki -- Page Revision <<ID>>"""

html_close = """
</body></html>
"""

start_page = "Home"

strings_inserts={'edit_head': edit_head, 'display_head':display_head,'edit_body_prefix':edit_body_prefix, 'body_prefix': body_prefix, 'edit_body': edit_body,
	'display_body': display_body, 'body_postfix': body_postfix, 'html_close': html_close}
config_inserts={'dbversion':'0.1', 'start_page':start_page}
